package com.trkj.dao.jpa;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.trkj.pojos.MedcineCompany;
/**
 * 药品单位dao
 * @author Administrator
 *
 */
public interface IMedcineCompanyDAO extends CrudRepository<MedcineCompany, Long> {
	//查询所有的药品单位
	@Query("select new MedcineCompany(c.medcinecompanyId,c.medcinecompanyName) from MedcineCompany c order by c.medcinecompanyId desc")
	public List<MedcineCompany> getAllMedcineCompany();
}
